<script type="text/javascript">
function loginDialog()
{
	jQuery('#login_dialog').dialog('open');
	jQuery('#login_dialog').dialog({
		bgiframe: true,
		resizable: false,
		height:200,
		modal: true,
		closeOnEscape: false,
		overlay: 
		{
			backgroundColor: '#000',
			opacity: 0.5
		},
		buttons: 
		{
			'<?php echo ucfirst($txt->getWord('cancel')); ?>': function() 
			{
				jQuery(this).dialog('close');
				document.location.href = "/";
			},
			'<?php echo ucfirst($txt->getWord('login')); ?>': function() 
			{
				jQuery('#username').val(jQuery('#uname').val());
				jQuery('#password').val(jQuery('#pass').val());
				jQuery(this).dialog('close');
				jQuery('#login_form').submit();
			}
		},
		close: function() 
		{  document.location.href = "/"; }
	});
}
</script>
<form name="login_form" id="login_form" enctype="multipart/form-data" method="post" action="">
	<input type="hidden" name="username" id="username" value="" />
    <input type="hidden" name="password" id="password" value="" />
    <input type="hidden" name="action" id="action" value="login_user">
</form>
<div id="login_dialog" title="Katana - Login" style="text-align:left; display:none;">
<fieldset>
    <label for="username"><?php echo ucfirst($txt->getWord('username')); ?></label><br />
    <input type="text" name="uname" id="uname" class="text ui-widget-content ui-corner-all" /><br /><br />
    <label for="password"><?php echo ucfirst($txt->getWord('password')); ?></label><br />
    <input type="password" name="pass" id="pass" value="" class="text ui-widget-content ui-corner-all" /><br />
</fieldset>
</div>

